<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['action.list']}">
	<rich:dataTable id="data" var="obj" value="#{actionBulletinBean.actionBulletinList}" rows="10" width="99%" >
		<rich:column style="text-align:center;width:15%;">
			<f:facet name="header">
				<h:outputText value="#{messages['date.time']}">
				</h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.createdDate}">
				<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
			</t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:75%;">
			<f:facet name="header">
				<h:outputText value="#{messages['action.name']}"></h:outputText>
			</f:facet>
			<t:outputText styleClass="standardText" value="#{obj.actionCode}"></t:outputText>
		</rich:column>
		<rich:column style="text-align:center;width:10%;">
			<f:facet name="header">
				<h:outputText value="#{messages['action']}"></h:outputText>
			</f:facet>
			<t:commandButton value="#{messages['acknowledge']}" styleClass="button" rendered="#{obj.type == actionBulletinBean.ackType}" 
			action="#{actionBulletinBean.ackAction}" actionListener="#{actionBulletinBean.ackListener}"></t:commandButton>
			<t:commandButton value="#{messages['action']}" styleClass="button" rendered="#{obj.type == actionBulletinBean.actionType}" 
			action="#{actionBulletinBean.action}" actionListener="#{actionBulletinBean.actionListener}"></t:commandButton>
			
			
			<f:param id="abId" value="#{obj.actionBulletinId}"/>
		</rich:column>
		 
	</rich:dataTable>
	
		<rich:spacer height="30" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />

	<rich:spacer height="30" />

            
</rich:panel>
